home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Medabots Cardz
/
Medabots CD Cardz Rokusho.bin
/
pc
/
assets
/
rokusho.dxr
/
00211_Script_211
< prev
next >
Wrap
Text File
|
2001-12-07
|
2KB
|
42 lines
property beginscore, myFile, squam
on beginsprite me
set the floatPrecision = 0
squam = getOSdirectory()&"\"
if objectP(myFile) then set myFile = 0 --Delete the instance if it already exists
myFile = new(xtra "fileio") -- Create an instance of FileIO
-- openFile(myFile,the moviePath&"info.txt",1) --Open the file with read access
openFile(myFile,squam&"infor.txt",0) --Open the file with read access
myVariable = readFile(myFile) --set the variable 'myVariable' to the text of the file 'info.txt'
if readFile(myFile)=VOID then --checks to see if this file exists
createFile (myFile, squam&"infor.txt")
openFile(myFile,squam&"infor.txt",0)
beginscore = 100
put beginscore into member("holdscore")
mySaveString = member("holdscore").text
writeString(myFile,mySaveString)
else
beginscore = myVariable
closeFile(myFile) -- Close the file
end if
myFile = 0 -- Dispose of the instance
--
--
-- if objectP(myFile) then set myFile = 0 --Delete the instance if it already exists
-- myFile = new(xtra "fileio") -- Create an instance of FileIO
-- -- openFile (myFile, the moviePath &"info.txt",0)--Open the file with R/W access
-- openFile (myFile, squam&"info.txt",0)--Open the file with R/W access
-- delete(myFile) --deletes the file
-- -- createFile (myFile, the moviePath &"info.txt") --creates the file again
-- createFile (myFile, squam&"info.txt") --creates the file again
-- -- openFile(myFile,the moviePath &"info.txt",0) --Open the file with R/W access
-- openFile(myFile, squam&"info.txt",0) --Open the file with R/W access
-- -- mySaveString = thescore --puts the contents of the field 'input' into the variable mySaveString
-- mySaveString = member("holdscore").text
-- writeString(myFile,mySaveString) --writes text to the file
--
-- closeFile(myFile) -- Close the file
-- myFile = 0 -- Dispose of the instance
end